<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>Home Page</title>
<meta name="author" content="Fabio Fondi">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="shortcut icon" href="/favicon.ico">
<!-- <link rel="apple-touch-icon" href="/apple-touch-icon.png"> -->
<link href="libs/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="libs/bootstrap/css/bootstrap-responsive.min.css"
	rel="stylesheet">
<link href="styles/css/login.css" rel="stylesheet">

</head>

<body>

	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span10 offset1">

				<div id="selectUserBox" class="span6 offset3">
					<h3>
						Seleziona il personaggio <br />
					</h3>
					<p class="text-left">Seleziona il personaggio con cui vuoi
						giocare e inizia l'avventura.</p>
					<hr />

					{code}newCharacter{/code}

					<ul class="thumbnails" id="listUser">{code}thumbCharacter{/code}
					</ul>
					{code}changePassword{/code}

				</div>
			</div>
		</div>

		<script src="libs/jquery/jquery-1.10.2.min.js"></script>
		<script src="libs/bootstrap/js/bootstrap.min.js"></script>
		<script src="js/function-custom.js"></script>
		<script>
			$(function() {
				chpassSlideDown();
				$("#submitCreateUser").click(function(e) {
					e.preventDefault();
					var dataForm = $("#createUser").serialize();
					$.ajax({
						url: 'createuser.php',
						method: 'POST',
						data: dataForm,
						dataType: 'json',
						success: function(response)
						{
							$('#listUser').append('<li class="span5 offset1"><div class="thumbnail"><img src="' + response.charImg + '" width="300" height="200"><div class="caption"><h5>' + response.charName + ' ' + response.charLastName + '</h5><form action="#" method="post"><p><button class="btn btn-success" value="' + response.charId + '">Entra</button></p></form></div></div></li>');
							$("#charReg").modal('hide');
						}
					});

				});
			});
		</script>
</body>
</html>
